package com.vooda.constant;

/**
 * 错误码枚举类
 *
 * @author charlee
 * @date 2017-11-30
 */
public enum ErrorCode {
    /**
     * 操作成功
     */
    SUCCESS(200, "success"),

    /**
     * 未知错误
     */
    FAILURE(500, "未知错误"),

    /**
     * 参数错误
     */
    PARAM_ERROR(600, "参数错误"),

    /**
     * token已过期
     */
    EXPIRED_TOKEN(700, "token已过期，请重新获取"),

    /**
     * 已经领取过优惠券
     */
    HAS_GET_TICKET(1002, "该优惠券您已领取还未使用！"),

    NOT_FOUND_USER_TICKET(1003, "未找到该用户的此优惠券信息"),

    NOT_CASHIER(1004, "你不是收银员，无法进行扫码操作！"),

    OPEN_ID_ERROR(1005, "OPENID获取失败！"),

    GET_PHONE_ERROR(1006, "获取手机号失败！"),

    NO_PERSON(1007, "未找到相关用户信息！"),

    TICKET_OUTDATE(1008, "优惠券已过期！"),

    BAG_IS_GET(1009, "福袋已经领取过！"),

    CODE_HAS_OVERTIME(800, "图形验证码已过期，请重新获取"),

    VERIFY_CODE_ERROR(801, "图形验证码错误");


    private Integer code;
    private String msg;

    ErrorCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
